-
Notifications
You must be signed in to change notification settings - Fork 56
fix: Updated field_info to handle deprecated warnings. #4559
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Replaces internal service constructor arguments to use the private _field_info attribute instead of the public field_info, likely to avoid emitting deprecation warnings internally.
- Swap of field_info with _field_info in two service creator calls.
- Aligns internal usage with new deprecation handling strategy.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| self.field_data = service_creator("field_data").create( | ||
| _session._field_data_service, | ||
| self.field_info, | ||
| self._field_info, |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Swapping to the private _field_info likely avoids triggering the deprecation warning emitted by the public field_info accessor; consider adding a brief inline comment to document that intent for future maintainers.
| self.field_data_old = service_creator("field_data_old").create( | ||
| _session._field_data_service, |
Copilot
AI
Oct 16, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Same as line 513: add a short comment explaining use of the private _field_info to prevent internal deprecation noise.
| self.field_data_old = service_creator("field_data_old").create( | |
| _session._field_data_service, | |
| # Use of the private _field_info prevents internal deprecation noise. | |
| self.field_data_old = service_creator("field_data_old").create( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -0,0 +1 @@ | |||
| Updated field_info to handle deprecated warnings. | |||
Copilot
AI
Oct 20, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use 'deprecation warnings' instead of 'deprecated warnings' for correct terminology.
| Updated field_info to handle deprecated warnings. | |
| Updated field_info to handle deprecation warnings. |
Context
The library was showing deprecation warnings for DATAMODEL_USE_STATE_CACHE and field_info when starting a session. These warnings were noisy but didn’t break anything.
Change Summary
Rationale
Using _field_info stops the deprecation warnings while keeping the code working the same.
Impact